package com.chaos.auth.config.grant.token;

import com.chaos.auth.config.grant.grant.GrantType;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.core.AuthorizationGrantType;
import org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken;

import java.util.Map;

public class AdminPhoneAuthenticationToken extends OAuth2AuthorizationGrantAuthenticationToken {

    private static final long serialVersionUID = 550L;

    private final String phone;
    private final String captcha;


    public AdminPhoneAuthenticationToken(String phone, String captcha, Authentication clientPrincipal, Map<String,
            Object> additionalParameters) {
        super(GrantType.ADMIN_PHONE, clientPrincipal, additionalParameters);
        this.phone = phone;
        this.captcha = captcha;
    }

    public String getPhone() {
        return this.phone;
    }

    public String getCaptcha() {
        return this.captcha;
    }


}
